﻿@using Models
@using(Html.BeginForm("AllNews","Admin"))
{
    var categoryList = ViewBag.Categories as List<Category>;
    categoryList.Insert(0,new Category{Id = 0,Name = "-----"});
    @Html.DropDownList("categoryId",new SelectList(categoryList,"Id","Name",0))
    <label>
        Title
    </label>
    @Html.TextBox("titleSearch")
    <label>
        Text
    </label>
    @Html.TextBox("textSearch")
    <input type="submit" name="subFilter" value="sort"/>
}
<b>@ViewBag.Message</b>